
<h1> Inventory Adjustment  for <%= @variant.product_name %> </h1>

<%= form_for(@variant, url: admin_inventory_adjustment_path(@variant)) do |f| %>
  <%= render partial: 'form', locals: { f: f } %>

  <div class=" generic_submit_button">
    <%= f.submit "Update Inventory",
                    class: "button",
                    id:    "adjust_inventory_button" %>
  </div>

<% end %>

<table class='hover'>
  <thead>
    <tr>
      <th>SKU</th>
      <th>count on hand</th>
      <th>pending to customer</th>
      <th>count pending from supplier</th>
      <th></th>
    </tr>
  </thead>
    <tr>
      <td><%= @variant.sku %></td>
      <td><%= @variant.inventory.count_on_hand %></td>
      <td><%= @variant.inventory.count_pending_to_customer %></td>
      <td><%= @variant.inventory.count_pending_from_supplier %></td>
    </tr>
</table>

<p>
  <%= link_to "Show #{@variant.product_name}" , admin_inventory_adjustment_path( @variant.product ), class: 'button secondary' %>
  <%= link_to 'View Products', admin_inventory_adjustments_path, class: 'button secondary' %>
</p>
